package org.gbif.biogarage.model;

import java.util.Date;

import org.apache.commons.lang.StringUtils;

public class User{
	private Long id;
	private String email;
	private String password;
	private String realname;
	private String defaultLang="en";
	private Date created;
	private Date lastLogin;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getRealname() {
		return realname;
	}
	public void setRealname(String realname) {
		this.realname = realname;
	}
	
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}

	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = StringUtils.trimToNull(email);
		if (this.email!=null){
			this.email=this.email.toLowerCase();
		}
	}
	
    public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getLastLogin() {
		return lastLogin;
	}
	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}
	
}
